#ifndef _SPRITE_H_
#define _SPRITE_H_

#ifdef _WIN32
#pragma once
#endif

// 03.04.12 - Steven Hartin - Original Creation

#include <d3dx9.h>

#include "texture.h"
#include "devicemanager.h"
#include "constants.h"

class CSprite
{
public:
    CSprite(CTexture *pTexture);
    ~CSprite();

    void setPosition(float fX, float fY);
    void getPosition(float &fX, float &fY) const;
    float getX() const;
    float getY() const;

    void setRotation(float fAngle);
    void setRotationDegrees(float fAngle);
    float getRotation() const;
    float getRotationDegrees() const;

    void setVisible(bool bVisible);
    bool isVisible() const;

    void setScale(float fScaleX, float fScaleY);
    float getScaleX() const;
    float getScaleY() const;

    void render();

    LPD3DXSPRITE getSprite() const;

private:
    CTexture *m_pTexture;

    float m_fX;
    float m_fY;

    float m_fScaleX;
    float m_fScaleY;

    bool m_bVisible;

    float m_fRotation;

    LPD3DXSPRITE m_pSprite;
};

#endif